package icom.acm.util.json;
/**
 * 
 * @author shench
 * 处理一条msg信息
 */
public class JSONMsg {
	private Boolean success;
	private String msg;
	private String children;
	
	public JSONMsg(boolean flag, String msg){
		success = flag;
		this.msg = msg;
		children = "[]";
	}
	
	public void include(String json){
		children = "["+json+"]";
	}
	
	@Override
	public String toString(){	
		String arg = success?"true":"false";
		String res = "{\"success\":" + arg + ",\"msg\":\""+msg+"\",\"children\":"+children+"}";
System.out.println("--json-----"+res);
		return res;
	}
}
